﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <meta content="history" name="save">
        <title>SA1207: ProtectedMustComeBeforeInternal</title>
        <link rel="stylesheet" type="text/css" href="stylesheets/helpstudio.css"><link rel="stylesheet" type="text/css" href="styles/Presentation.css">
        <script src="script/helpstudio.js" type="text/javascript"></script>    
        <script src="script/StandardText.js" type="text/jscript"></script>
    </head>
    <body id="hsbody">
        <input type="hidden" id="userDataCache" class="userDataStyle" name="userDataCache" />
        <div id="allHistory" class="saveHistory" onsave="saveScrollPosition()" onload="loadScrollPosition()"></div>
        <script type="text/jscript">WritePageTop(document.title);</script>
        <div id="pagebody">
            <div id="mainbody">
                <table>
                    <col />
                    <tr><td><p>TypeName</p></td><td><p>ProtectedMustComeBeforeInternal</p></td></tr>
                    <tr><td><p>CheckId</p></td><td><p>SA1207</p></td></tr>
                    <tr><td><p>Category</p></td><td><p>Ordering Rules</p></td></tr>
                </table>           
                <h2>Cause</h2>
                <P>The keyword <EM>protected</EM> is positioned after the keyword <EM>internal</EM> within the declaration of a protected internal C# element.</P>
                <H2>Rule Description</H2>
                <P>A violation of this rule occurs when a protected internal element’s access modifiers are written as <EM>internal protected</EM>. In reality, an element with the keywords <EM>protected internal</EM> will have the same access level as an element with the keywords <EM>internal protected</EM>. To make the code easier to read and more consistent, StyleCop standardizes the ordering of these keywords, so that a protected internal element will always be described as such, and never as internal protected. This can help to reduce confusion about whether these access levels are indeed the same.</P>
                <H2>How to Fix Violations</H2>
                <P>To fix an instance of this violation, place the <EM>protected</EM> keyword before the <EM>internal</EM> keyword.</P>
                <h2>How to Suppress Violations</h2>
                <pre>[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1207:ProtectedMustComeBeforeInternal", Justification = "Reviewed.")]</pre>
            </div>
            <script type="text/jscript">WritePageFooter();</script>     
        </div>
    </body>
</html>